<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title></title>
<link rel="stylesheet" href="__PUBLIC__/css/pintuer.css">
<link rel="stylesheet" href="__PUBLIC__/css/admin.css">
<script src="__PUBLIC__/js/jquery.js"></script>
<script src="__PUBLIC__/js/pintuer.js"></script>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/ue/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/ue/ueditor.all.min.js"> </script>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/ue/lang/zh-cn/zh-cn.js"></script>
</head>
<body>
<div class="panel admin-panel margin-top" id="add">
  <div class="panel-head"><strong><span class="icon-pencil-square-o"></span> 增加新闻</strong></div>
  <div class="body-content">
    <form method="post" class="form-x" action="" enctype="multipart/form-data">    
      <div class="form-group">
        <div class="label">
          <label>标题：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" value="" name="title" data-validate="required:请输入标题" />
          <div class="tips"></div>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label>封面图片：</label>
        </div>
        <div class="field">
          <input type="file" class="input w50" name="cover_img" value=""  style="float:left;">
          <div class="tipss">图片尺寸：1920*500</div>
        </div>
      </div>
      <div class="form-group">
          <div class="label">
            <label>摘要：</label>
          </div>
          <div class="field">
            <textarea class="input w50" name="abstract" value=""  style="float:left;"></textarea>
          </div>
      </div>
      <div class="form-group">
          <div class="label">
            <label>正文：</label>
          </div>
          <div class="field">
              <script id="editor" name="text" type="text/plain" style="width:800px;height:300px;"></script>
          </div>
      </div>
      <div class="form-group">
          <div class="label">
            <label>作者：</label>
          </div>
          <div class="field">
            <input type="text" class="input w50" value="" name="author" data-validate="required:请输入作者" />
            <div class="tips"></div>
          </div>
        </div>
      <div class="form-group">
        <div class="label">
          <label></label>
        </div>
        <div class="field">
          <button class="button bg-main icon-check-square-o" type="submit"> 提交</button>
        </div>
      </div>
    </form>
  </div>
</div>
<script>
    //导入ue第四步:实例化编辑器
    var ue = UE.getEditor('editor');
    $(function(){
        $('#btnSubmit').on('click',function(){
            $('form').submit();
        });
        $('#btnReset').on('click',function(){
            $('form')[0].reset();
        });
    });

    $(".select-title").on("click",function(){
      $(".select-list").toggle();
      return false;
    });
    $(".select-list").on("click","li",function(){
      var txt = $(this).text();
      $(".select-title").find("span").text(txt);
    });
    showRemind('input[type=text], textarea','placeholder');
  </script>
</body></html>